package com.tao.YanMoDesignPattern.Strategy.case3_withTemplate;

/**
 * @Author Mi_Tao
 * @Date 2023/7/22
 * @Description
 * @Version 1.0
 **/
public class DbLog extends LogStategyTemplate {

    @Override
    protected void doLog(String msg) {
        if (msg != null && msg.trim().length() > 5){
            // 制造一个运行时错误
            int a = 5/0;
        }
        System.out.println("'"+msg+"' 记录到数据库中");
    }
}
